﻿using CuaHangLego.Model;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CuaHangLego.Bussiness.Parser
{
    public class KhachHangParser
    {
        public static KhachHang Parse(SqlDataReader sdata)
        {
            KhachHang kh = new KhachHang();
            kh.MaSo = int.Parse(sdata["ID"].ToString());
            kh.HoTen = sdata["HoTen"].ToString();
            kh.Email = sdata["Email"].ToString();
            kh.DiaChi = sdata["DiaChi"].ToString();
            kh.DienThoai = sdata["DienThoai"].ToString();
            kh.SoThich = sdata["SoThich"].ToString();
            kh.CMND = sdata["CMND"].ToString();
            return kh;
        }
    }
}
